var express = require ('express');
var router = express.Router ();

router.get ('/', function (req, res) {
    res.render ('index', {title: 'CSS3 常规使用特效 ', page: 1, actived: '/'});
});

router.get ('/boxshadow', function (req, res) {
    res.render ('demo/boxshadow', {title: 'CSS3 Box Shadow', page: 2, actived: 'boxshadow'});
});

router.get ('/beforeafter', function (req, res) {
    res.render ('demo/beforeafter', {title: 'CSS3 Before After', page: 3, actived: 'beforeafter'});
});

router.get ('/transition', function (req, res) {
    res.render ('demo/transition', {title: 'CSS3 Transition', page: 4, actived: 'transition'});
});

router.get ('/spa', function (req, res) {
    res.render ('demo/spa', {title: 'CSS3 SPA', page: 5, actived: 'spa'});
});

router.get ('/poster', function (req, res) {
    res.render ('demo/poster', {title: 'CSS3 Poster', page: 6, actived: 'poster'});
});

router.get ('/gradienter', function (req, res) {
    res.render ('demo/gradienter', {title: 'CSS3 Gradienter', page: 7, actived: 'gradienter'});
});
router.get ('/magic', function (req, res) {
    res.render ('demo/magic', {title: 'CSS3 Magic', page: 8, actived: 'magic'});
});
router.get ('/over', function (req, res) {
    res.render ('demo/over', {title: 'CSS3 修炼秘术', page: 9, actived: 'over'});
});
router.get('*', function (req, res) {
    res.render ('index', {title: 'CSS3 常规使用特效 ', page: 1, actived: '/'});
});
module.exports = router;